package com.ailot.cloud.base.security.authentication.model;

import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class JwtUser extends User {

    /**
     * 用户ID
     */
    @Getter
    private String id;

    /**
     * 机构ID
     */
    @Getter
    private String orgId;

    public JwtUser(String id, String orgId, String username, String password, boolean enabled, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, true, true, true, authorities);
        this.id = id;
        this.orgId = orgId;
    }
}
